<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
<head>

<meta name="generator" content="PHPDoctor 2RC2 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Tue, 09 Dec 2008 09:11:43 +0000">

<link rel="stylesheet" type="text/css" href="../stylesheet.css">
<link rel="start" href="../overview-summary.html">

<title>ChangeSetBatch (Moriarty)</title>

</head>
<body id="definition" onload="parent.document.title=document.title;">

<div class="header">
<h1>Moriarty</h1>
<ul>
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="../moriarty/package-summary.html">Package</a></li>
<li class="active">Class</li>
<li><a href="../moriarty/package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
</ul>
</div>

<div class="small_links">
<a href="../index.html" target="_top">Frames</a>
<a href="../moriarty/changesetbatch.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>

<div class="qualifiedName">Moriarty.ChangeSetBatch</div>

<h1>Class ChangeSetBatch</h1>

<pre class="tree"><strong>ChangeSetBatch</strong><br /></pre>

<hr>

<p class="signature">public  class <strong>ChangeSetBatch</strong></p>

<div class="comment" id="overview_description"><p>
Represents a batch of changesets. Can be used to create changesets based on the difference between two graphs.</p></div>

<dl>
<dt>See Also:</dt>
<dd><a href="http://n2.talis.com/wiki/Metabox#Batch_Updating">http://n2.talis.com/wiki/Metabox#Batch_Updating</a></dd>
</dl>
<hr>

<table id="summary_constr">
<tr><th colspan="2">Constructor Summary</th></tr>
<tr>
<td class="description"><p class="name"><a href="#ChangeSetBatch()">ChangeSetBatch</a>(array args)</p><p class="description">
Create a new changeset batch. </p></td>
</tr>
</table>

<table id="summary_method">
<tr><th colspan="2">Method Summary</th></tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#get_changesets()">get_changesets</a>()</p><p class="description">
Returns the list of changesets constructed from the input graphs</p></td>
</tr>
<tr>
<td class="type">private  void</td>
<td class="description"><p class="name"><a href="#init()">init</a>()</p></td>
</tr>
</table>

<h2 id="detail_constr">Constructor Detail</h2>
<h3 id="ChangeSetBatch()">ChangeSetBatch</h3>
<code class="signature">public <strong>ChangeSetBatch</strong>(array args)</code>
<div class="details">
<p>
Create a new changeset batch. This will calculate the required additions and removals based on before and after versions of a graph. The args parameter is an associative array that may have the following fields:
<ul>
  <li><em>subjectOfChange</em> => a string representing the URI of the changeset's subject of change</li>
  <li><em>createdDate</em> => a string representing the date of the changeset</li>
  <li><em>creatorName</em> => a string representing the creator of the changeset</li>
  <li><em>changeReason</em> => a string representing the reason for the changeset</li>
  <li><em>after</em> => an array of triples representing the required state of the graph after the changeset would be applied</li>
  <li><em>before</em> => an array of triples representing the state of the graph before the changeset is applied</li>
  <li><em>after_rdfxml</em> => a string of RDF/XML representing the required state of the graph after the changeset would be applied. This is parsed and used to overwrite the 'after' parameter, if any</li>
  <li><em>before_rdfxml</em> => a string of RDF/XML representing the state of the graph before the changeset is applied. This is parsed and used to overwrite the 'begin' parameter, if any.</li>
</ul>
If none of 'after', 'before', 'after_rdfxml' or 'before_rdfxml' is supplied then an empty changeset is constructed. <br />
The 'after' and 'before' arrays are simple arrays where each element is a triple array with the following structure:
<ul>
  <li><em>s</em> => the subject URI</li>
  <li><em>p</em> => the predicate URI</li>
  <li><em>o</em> => the value of the object</li>
  <li><em>o_type</em> => one of 'uri', 'bnode' or 'literal'</li>
  <li><em>o_lang</em> => the language of the literal if any</li>
  <li><em>o_datatype</em> => the data type URI of the literal if any</li>
</ul></p><dl>
<dt>Parameters:</dt>
<dd>args - an associative array of parameters to use when constructing the changeset</dd>
</dl>
</div>

<hr>

<h2 id="detail_method">Method Detail</h2>
<h3 id="get_changesets()">get_changesets</h3>
<code class="signature">public  array <strong>get_changesets</strong>()</code>
<div class="details">
<p>
Returns the list of changesets constructed from the input graphs</p><dl>
<dt>Returns:</dt>
<dd>the list of changesets</dd>
</dl>
</div>

<hr>

<h3 id="init()">init</h3>
<code class="signature">private  void <strong>init</strong>()</code>
<div class="details">
</div>

<hr>

<div class="header">
<h1>Moriarty</h1>
<ul>
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="../moriarty/package-summary.html">Package</a></li>
<li class="active">Class</li>
<li><a href="../moriarty/package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
</ul>
</div>

<div class="small_links">
<a href="../index.html" target="_top">Frames</a>
<a href="../moriarty/changesetbatch.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>

<p id="footer">This document was generated by <a href="http://phpdoctor.sourceforge.net/">PHPDoctor: The PHP Documentation Creator</a></p>

</body>

</html>